package org.restoran.model;

import org.hibernate.validator.constraints.NotEmpty;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

/**
 * Simple JavaBean domain object representing an person.
 *
 * @author Snisar Bogdan.
 */
@MappedSuperclass
public abstract class Person extends NameEntity {

    @Column (name = "FIRST_NAME")
    @NotEmpty (message = "Person mast have first name")
    private String firstName;

    @Column (name = "LAST_NAME")
    @NotEmpty (message = "Person mast have last name")
    private String lastName;

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

}
